from common.base import Base,By



class LonginPage(Base):
    """
    封装页面的表现层[元素定位]和操作层[点击，输入，获取属性值]
    """
    login_url = 'https://ecshop.test2.shopex123.com/user.php'

    def username_ipt(self,username):
        # 定位用户框输入用户名
        self.send_keys((By.NAME,'username'),username)

    def password_ipt(self,password):
        # 定位密码框输入密码
        self.send_keys((By.NAME,'password'),password)

    def remember(self):
        # 定位记住密码单选框点击
        self.click((By.ID,'remember'))

    def login_btn(self):
        # 定位登录按钮点击
        self.click((By.CLASS_NAME,'loginbtn'))



if __name__ == '__main__':
    pass
